<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">

        <title> 三百三医疗器械</title>




        <meta name="keywords" content="">
        <meta name="description" content="">

        <!--[if lt IE 9]>
        <meta http-equiv="refresh" content="0;ie.html" />
        <![endif]-->

        <link rel="shortcut icon" href=""> 
        <link href="./public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
        <link href="./public/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
        <link href="./public/css/animate.css" rel="stylesheet">
        <link href="./public/css/style.css?v=4.1.0" rel="stylesheet">

        <!-- 全局js -->
        <script src="./public/js/jquery.min.js?v=2.1.4"></script>
        <script src="./public/js/bootstrap.min.js?v=3.3.6"></script>
        <script src="./public/js/plugins/metisMenu/jquery.metisMenu.js"></script>
        <script src="./public/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
        <script src="./public/js/plugins/layer/layer.min.js"></script>

        <!-- 自定义js -->
        <script src="./public/js/hAdmin.js?v=4.1.0"></script>
        <script type="text/javascript" src="./public/js/index.js"></script>

        <!-- 第三方插件 -->
        <script src="./public/js/plugins/pace/pace.min.js"></script>
        <script type="text/javascript">
            $.ajax({
                type: "post",
                url: "./../controller/login.php",
                success: function (e) {
                    var result = eval("(" + e + ")");
                    //console.log(result);
                    if (result.code != 0) {
                        window.location = "./login.php";
                        return;
                    }
                    if (result.data != "") {
                        var rolearr = result.data.split(",");
                        $(rolearr).each(function (k, v) {
                            //console.log("#menu_" + v);
                            $("#menu_" + v).css("display", "none");
                        });
                    }
                }
            });
        </script>


    </head>

    <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
        <div id="wrapper">
            <!--左侧导航开始-->
            <nav class="navbar-default navbar-static-side" role="navigation">
                <div class="nav-close"><i class="fa fa-times-circle"></i>
                </div>
                <div class="sidebar-collapse">
                    <ul class="nav" id="side-menu">
                        <li class="nav-header">
                            <div class="dropdown profile-element">
                                <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                    <span class="clear">
                                        <span class="block m-t-xs" style="font-size:20px;">
                                            <i class="fa fa-area-chart"></i>
                                            <strong class="font-bold" id="HuanJiInspection">三百山医疗器械</strong>
                                        </span>
                                    </span>
                                </a>
                            </div>
                            <div class="logo-element" id="HuanJiInspection_sec">三百山医疗器械
                            </div>
                        </li>
                        <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                            <span class="ng-scope">分类</span>
                        </li>
                        <li id="menu_1" class="toplist1">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">客户列表</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./customer/index.php">客户管理</a>
                                </li>

                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_2" class="toplist2">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">使用者类型</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./usertype/index.php">类型管理</a>
                                </li>

                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_3" class="toplist3">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">地区</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./ragion/areaindex.php">地区管理</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./ragion/streetindex.php">街道管理</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./ragion/communityindex.php">社区管理</a>
                                </li>
                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_4"  class="toplist4">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">预约管理</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./order/orderlist.php">预约列表</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./order/myorder.php">订单列表</a>
                                </li>
                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_5"  class="toplist5">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">工作人员</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./worker/index.php">工作人员管理</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./worker/user.php">后台账号管理</a>
                                </li>
                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_6"  class="toplist6">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">预约时间</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./rtime/index.php">预约时间管理</a>
                                </li>
                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_7"  class="toplist7">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">服务管理</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./service/index.php">服务管理</a>
                                </li>

                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_8"  class="toplist8">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">爬楼机列表</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./mechine/index.php">爬楼机地图</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./mechine/mechinelist.php">爬楼机列表</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./mechine/addmechine.php">新增爬楼机</a>
                                </li>
                            </ul>
                        </li>
                        <li class="line dk"></li>
                        <li id="menu_9" class="toplist9">
                            <a href="#" >
                                <i class="fa fa fa-bar-chart-o"></i>
                                <span class="nav-label" id="SystemSet"  title="">统计图表</span>
                                <span class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-second-level">
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./count/basic.php">基础统计</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./count/around.php">使用周期</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./count/service.php">服务统计</a>
                                </li>
                                <li id="menu_">
                                    <a class="J_menuItem" id="DashBoard" title="" href="./count/statis.php">满意度统计</a>
                                </li>
                            </ul>
                        </li>
                        <li class="line dk"></li>
                    </ul>
                </div>
            </nav>
            <!--左侧导航结束-->
            <!--右侧部分开始-->
            <div id="page-wrapper" class="gray-bg dashbard-1">
                <div class="row border-bottom">
                    <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                        <div class="navbar-header" style="width: 50%;">
                            <a class="navbar-minimalize minimalize-styl-2 btn btn-info " href="#"><i class="fa fa-bars"></i> </a>

                        </div>





                        <ul class="nav navbar-top-links navbar-right">

                            <!-- <button type="button" id="Logout" class="btn btn-default btn-sm" onclick="logout()">退出</button> -->

                            <li class="dropdown">
                                <a class="dropdown-toggle count-info" data-toggle="dropdown" id="top_username" href="#">
                                    &nbsp;
                                </a>


                                <ul class="dropdown-menu dropdown-alerts" style="width: 150px;">
                                    <li>
                                        <a href="./system/userinfo.php" class="J_menuItem">
                                            <div style="text-align: center;" id="Personal">
                                                个人中心
                                            </div>
                                        </a>
                                    </li>

                                    <li class="divider"></li>
                                    <li>
                                        <div class="text-center link-block">
                                            <a class="J_menuItem" onclick="logout()">
                                                <strong id="Logout">退出</strong>
                                            </a>
                                        </div>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </nav>
                </div>
                <div class="row J_mainContent" id="content-main">
                    <iframe id="J_iframe" width="100%" height="100%" src="./usertype/index.php" frameborder="0" data-id="./customer/index.php" seamless></iframe>
                </div>
            </div>
            <!--右侧部分结束-->
        </div>

        <script>
            //异步方法
            function getmsg() {
                $.ajax({
                    url: '../controller/index.php',
                    success: function (e) {
                        console.log(e);
                        var result = eval("(" + e + ")");
                        if (result.code == 0 && result.num > 0) {
                            //console.log('yes');
                            var html = '<div class="alert alert-success alert-dismissable">';
                            html += '<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>';
                            html += "您收到新的预约<em style='font-size:1.5em;font-weight:blod;'>" + result.num + "</em>条,从<em style='font-size:1.5em;font-weight:blod;'>" + result.date + "</em>开始 </div>";
                            //console.log(html);
                            $("#content-main").before(html);
                            var leng = $(".alert-success").length;
                            if(leng > 2){
                                console.log('start clean');
                                $(".alert-success:first").remove();
                            }
                        }
                    }
                });
            }
            //定时请求获得是否存在新订单
            setInterval(function () {
                getmsg();
            }, 60000);
            //定时删除
        </script>
    </body>

</html>



